package kneipe;

import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class StatisticsPanel extends JPanel{
	private static final long serialVersionUID = 1L;
	private JLabel moneyBox;
	private Kneipe kneipe;

	public StatisticsPanel(Kneipe kneipe) {
		this.setLayout(new BoxLayout(this,BoxLayout.PAGE_AXIS));
		this.kneipe=kneipe;
		moneyBox = new JLabel("Potenzielles Geld der Kunden: "+kneipe.getGuestsmoney());
		this.add(moneyBox);
	}
	
	public void refresh() {
		if (moneyBox!=null) moneyBox.setText("Potenzielles Geld der Kunden: "+kneipe.getGuestsmoney());
	}

}
